package chapter1031;

public class Frock3 {
    private double size;
    private String color;
    private double price;
    private int serialNumber;

    private static int currentNum = 100000;

    static {
        currentNum = 150000;
        System.out.println(currentNum);
    }

    public Frock3() {
        serialNumber = getNextNum();
    }

    public int getSerialNumber() {
        return serialNumber;
    }

    public static int getNextNum(){
        return currentNum += 100;
    }

    public String getDetails() {
        return "Frock{" +
                "size=" + size +
                ", color='" + color + '\'' +
                ", price=" + price +
                '}';
    }

}
